/**
 *  iBizSys 5.0 机器人生产代码（不要直接修改当前代码）
 *  http://www.ibizsys.net
 */
package com.sa.litetwo.srv.card.entity;


import java.io.Serializable;
import java.util.HashMap;
import java.util.ArrayList;

import javax.persistence.Column;

import java.sql.Timestamp;
import net.ibizsys.paas.data.IDataObject;
import net.ibizsys.paas.data.DataObject;
import net.ibizsys.paas.util.StringHelper;
import net.sf.json.JSONObject;
import net.ibizsys.paas.util.JSONObjectHelper;
import net.ibizsys.paas.xml.XmlNode;
import net.ibizsys.paas.service.ServiceGlobal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * 实体[GG_ATTACH] 数据对象
 */
public class GG_ATTACH extends net.ibizsys.paas.entity.EntityBase implements Serializable {

   private static final long serialVersionUID = -1L;
   private static final Log log = LogFactory.getLog(GG_ATTACH.class); 
   /**
    *   实体属性标识[附件标识]
    */
   public final static String FIELD_GG_ATTACHID = "GG_ATTACHID";
   /**
    *   实体属性标识[附件名称]
    */
   public final static String FIELD_GG_ATTACHNAME = "GG_ATTACHNAME";
   /**
    *   实体属性标识[建立时间]
    */
   public final static String FIELD_CREATEDATE = "CREATEDATE";
   /**
    *   实体属性标识[建立人]
    */
   public final static String FIELD_CREATEMAN = "CREATEMAN";
   /**
    *   实体属性标识[更新时间]
    */
   public final static String FIELD_UPDATEDATE = "UPDATEDATE";
   /**
    *   实体属性标识[更新人]
    */
   public final static String FIELD_UPDATEMAN = "UPDATEMAN";
   /**
    *   实体属性标识[人员]
    */
   public final static String FIELD_CARDID = "CARDID";
   /**
    *   实体属性标识[附件类型]
    */
   public final static String FIELD_FJLX = "FJLX";
   /**
    *   实体属性标识[链接]
    */
   public final static String FIELD_LJ = "LJ";
   /**
    *   实体属性标识[附件]
    */
   public final static String FIELD_FJ = "FJ";
   /**
    *   实体属性标识[备注]
    */
   public final static String FIELD_BZ = "BZ";

   private final static int INDEX_GG_ATTACHID = 0;
   private final static int INDEX_GG_ATTACHNAME = 1;
   private final static int INDEX_CREATEDATE = 2;
   private final static int INDEX_CREATEMAN = 3;
   private final static int INDEX_UPDATEDATE = 4;
   private final static int INDEX_UPDATEMAN = 5;
   private final static int INDEX_CARDID = 6;
   private final static int INDEX_FJLX = 7;
   private final static int INDEX_LJ = 8;
   private final static int INDEX_FJ = 9;
   private final static int INDEX_BZ = 10;

   private final static HashMap<String, Integer> fieldIndexMap = new HashMap<String, Integer>();
   static
   {
       fieldIndexMap.put( FIELD_GG_ATTACHID, INDEX_GG_ATTACHID);
       fieldIndexMap.put( FIELD_GG_ATTACHNAME, INDEX_GG_ATTACHNAME);
       fieldIndexMap.put( FIELD_CREATEDATE, INDEX_CREATEDATE);
       fieldIndexMap.put( FIELD_CREATEMAN, INDEX_CREATEMAN);
       fieldIndexMap.put( FIELD_UPDATEDATE, INDEX_UPDATEDATE);
       fieldIndexMap.put( FIELD_UPDATEMAN, INDEX_UPDATEMAN);
       fieldIndexMap.put( FIELD_CARDID, INDEX_CARDID);
       fieldIndexMap.put( FIELD_FJLX, INDEX_FJLX);
       fieldIndexMap.put( FIELD_LJ, INDEX_LJ);
       fieldIndexMap.put( FIELD_FJ, INDEX_FJ);
       fieldIndexMap.put( FIELD_BZ, INDEX_BZ);
   }
   
   private GG_ATTACH proxyGG_ATTACH = null;

   public GG_ATTACH(){
        super();
   }
   private boolean gg_attachidDirtyFlag = false;
   private boolean gg_attachnameDirtyFlag = false;
   private boolean createdateDirtyFlag = false;
   private boolean createmanDirtyFlag = false;
   private boolean updatedateDirtyFlag = false;
   private boolean updatemanDirtyFlag = false;
   private boolean cardidDirtyFlag = false;
   private boolean fjlxDirtyFlag = false;
   private boolean ljDirtyFlag = false;
   private boolean fjDirtyFlag = false;
   private boolean bzDirtyFlag = false;

    @Column(name="gg_attachid")
    private String gg_attachid;
    @Column(name="gg_attachname")
    private String gg_attachname;
    @Column(name="createdate")
    private Timestamp createdate;
    @Column(name="createman")
    private String createman;
    @Column(name="updatedate")
    private Timestamp updatedate;
    @Column(name="updateman")
    private String updateman;
    @Column(name="cardid")
    private String cardid;
    @Column(name="fjlx")
    private String fjlx;
    @Column(name="lj")
    private String lj;
    @Column(name="fj")
    private String fj;
    @Column(name="bz")
    private String bz;

   
    /**
     *  设置属性值[附件标识]
     *  @param gg_attachid
     */
    public void setGG_ATTACHId(String gg_attachid){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setGG_ATTACHId(gg_attachid);
    		return;
    	}
        if(gg_attachid!=null)
        {
        	gg_attachid = StringHelper.trimRight(gg_attachid);
        	if(gg_attachid.length()==0){
        		gg_attachid = null;
        	}
        }
        this.gg_attachid =  gg_attachid; 
        this.gg_attachidDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[附件标识]
     */
    public String getGG_ATTACHId(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getGG_ATTACHId();
    	}
        return this.gg_attachid;
    }

    /**
     *  获取属性值[附件标识]是否修改
     */
    public boolean isGG_ATTACHIdDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isGG_ATTACHIdDirty();
    	}
        return this.gg_attachidDirtyFlag;
    }

    /**
     *  重置属性值[附件标识]
     */
    public void resetGG_ATTACHId(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetGG_ATTACHId();
    		 return;
    	}
    	
        this.gg_attachidDirtyFlag = false;
        this.gg_attachid = null;
    }
    /**
     *  设置属性值[附件名称]
     *  @param gg_attachname
     */
    public void setGG_ATTACHName(String gg_attachname){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setGG_ATTACHName(gg_attachname);
    		return;
    	}
        if(gg_attachname!=null)
        {
        	gg_attachname = StringHelper.trimRight(gg_attachname);
        	if(gg_attachname.length()==0){
        		gg_attachname = null;
        	}
        }
        this.gg_attachname =  gg_attachname; 
        this.gg_attachnameDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[附件名称]
     */
    public String getGG_ATTACHName(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getGG_ATTACHName();
    	}
        return this.gg_attachname;
    }

    /**
     *  获取属性值[附件名称]是否修改
     */
    public boolean isGG_ATTACHNameDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isGG_ATTACHNameDirty();
    	}
        return this.gg_attachnameDirtyFlag;
    }

    /**
     *  重置属性值[附件名称]
     */
    public void resetGG_ATTACHName(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetGG_ATTACHName();
    		 return;
    	}
    	
        this.gg_attachnameDirtyFlag = false;
        this.gg_attachname = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreateDate(Timestamp createdate){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setCreateDate(createdate);
    		return;
    	}
        this.createdate =  createdate; 
        this.createdateDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreateDate(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getCreateDate();
    	}
        return this.createdate;
    }

    /**
     *  获取属性值[建立时间]是否修改
     */
    public boolean isCreateDateDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isCreateDateDirty();
    	}
        return this.createdateDirtyFlag;
    }

    /**
     *  重置属性值[建立时间]
     */
    public void resetCreateDate(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetCreateDate();
    		 return;
    	}
    	
        this.createdateDirtyFlag = false;
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]代码表：com.sa.litetwo.srv.codelist.SysOperatorCodeListModel
     *  @param createman
     */
    public void setCreateMan(String createman){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setCreateMan(createman);
    		return;
    	}
        if(createman!=null)
        {
        	createman = StringHelper.trimRight(createman);
        	if(createman.length()==0){
        		createman = null;
        	}
        }
        this.createman =  createman; 
        this.createmanDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[建立人]代码表：com.sa.litetwo.srv.codelist.SysOperatorCodeListModel
     */
    public String getCreateMan(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getCreateMan();
    	}
        return this.createman;
    }

    /**
     *  获取属性值[建立人]是否修改
     */
    public boolean isCreateManDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isCreateManDirty();
    	}
        return this.createmanDirtyFlag;
    }

    /**
     *  重置属性值[建立人]
     */
    public void resetCreateMan(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetCreateMan();
    		 return;
    	}
    	
        this.createmanDirtyFlag = false;
        this.createman = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdateDate(Timestamp updatedate){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setUpdateDate(updatedate);
    		return;
    	}
        this.updatedate =  updatedate; 
        this.updatedateDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdateDate(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getUpdateDate();
    	}
        return this.updatedate;
    }

    /**
     *  获取属性值[更新时间]是否修改
     */
    public boolean isUpdateDateDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isUpdateDateDirty();
    	}
        return this.updatedateDirtyFlag;
    }

    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdateDate(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetUpdateDate();
    		 return;
    	}
    	
        this.updatedateDirtyFlag = false;
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]代码表：com.sa.litetwo.srv.codelist.SysOperatorCodeListModel
     *  @param updateman
     */
    public void setUpdateMan(String updateman){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setUpdateMan(updateman);
    		return;
    	}
        if(updateman!=null)
        {
        	updateman = StringHelper.trimRight(updateman);
        	if(updateman.length()==0){
        		updateman = null;
        	}
        }
        this.updateman =  updateman; 
        this.updatemanDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[更新人]代码表：com.sa.litetwo.srv.codelist.SysOperatorCodeListModel
     */
    public String getUpdateMan(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getUpdateMan();
    	}
        return this.updateman;
    }

    /**
     *  获取属性值[更新人]是否修改
     */
    public boolean isUpdateManDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isUpdateManDirty();
    	}
        return this.updatemanDirtyFlag;
    }

    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateMan(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetUpdateMan();
    		 return;
    	}
    	
        this.updatemanDirtyFlag = false;
        this.updateman = null;
    }
    /**
     *  设置属性值[人员]
     *  @param cardid
     */
    public void setCARDID(String cardid){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setCARDID(cardid);
    		return;
    	}
        if(cardid!=null)
        {
        	cardid = StringHelper.trimRight(cardid);
        	if(cardid.length()==0){
        		cardid = null;
        	}
        }
        this.cardid =  cardid; 
        this.cardidDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[人员]
     */
    public String getCARDID(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getCARDID();
    	}
        return this.cardid;
    }

    /**
     *  获取属性值[人员]是否修改
     */
    public boolean isCARDIDDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isCARDIDDirty();
    	}
        return this.cardidDirtyFlag;
    }

    /**
     *  重置属性值[人员]
     */
    public void resetCARDID(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetCARDID();
    		 return;
    	}
    	
        this.cardidDirtyFlag = false;
        this.cardid = null;
    }
    /**
     *  设置属性值[附件类型]代码表：com.sa.litetwo.srv.codelist.CLGG_FJLXCodeListModel
     *  @param fjlx
     */
    public void setFJLX(String fjlx){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setFJLX(fjlx);
    		return;
    	}
        if(fjlx!=null)
        {
        	fjlx = StringHelper.trimRight(fjlx);
        	if(fjlx.length()==0){
        		fjlx = null;
        	}
        }
        this.fjlx =  fjlx; 
        this.fjlxDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[附件类型]代码表：com.sa.litetwo.srv.codelist.CLGG_FJLXCodeListModel
     */
    public String getFJLX(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getFJLX();
    	}
        return this.fjlx;
    }

    /**
     *  获取属性值[附件类型]是否修改
     */
    public boolean isFJLXDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isFJLXDirty();
    	}
        return this.fjlxDirtyFlag;
    }

    /**
     *  重置属性值[附件类型]
     */
    public void resetFJLX(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetFJLX();
    		 return;
    	}
    	
        this.fjlxDirtyFlag = false;
        this.fjlx = null;
    }
    /**
     *  设置属性值[链接]
     *  @param lj
     */
    public void setLJ(String lj){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setLJ(lj);
    		return;
    	}
        if(lj!=null)
        {
        	lj = StringHelper.trimRight(lj);
        	if(lj.length()==0){
        		lj = null;
        	}
        }
        this.lj =  lj; 
        this.ljDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[链接]
     */
    public String getLJ(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getLJ();
    	}
        return this.lj;
    }

    /**
     *  获取属性值[链接]是否修改
     */
    public boolean isLJDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isLJDirty();
    	}
        return this.ljDirtyFlag;
    }

    /**
     *  重置属性值[链接]
     */
    public void resetLJ(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetLJ();
    		 return;
    	}
    	
        this.ljDirtyFlag = false;
        this.lj = null;
    }
    /**
     *  设置属性值[附件]
     *  @param fj
     */
    public void setFJ(String fj){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setFJ(fj);
    		return;
    	}
        if(fj!=null)
        {
        	fj = StringHelper.trimRight(fj);
        	if(fj.length()==0){
        		fj = null;
        	}
        }
        this.fj =  fj; 
        this.fjDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[附件]
     */
    public String getFJ(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getFJ();
    	}
        return this.fj;
    }

    /**
     *  获取属性值[附件]是否修改
     */
    public boolean isFJDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isFJDirty();
    	}
        return this.fjDirtyFlag;
    }

    /**
     *  重置属性值[附件]
     */
    public void resetFJ(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetFJ();
    		 return;
    	}
    	
        this.fjDirtyFlag = false;
        this.fj = null;
    }
    /**
     *  设置属性值[备注]
     *  @param bz
     */
    public void setBZ(String bz){
    	
    	if(this.getProxyEntity()!=null){
    		this.getProxyEntity().setBZ(bz);
    		return;
    	}
        if(bz!=null)
        {
        	bz = StringHelper.trimRight(bz);
        	if(bz.length()==0){
        		bz = null;
        	}
        }
        this.bz =  bz; 
        this.bzDirtyFlag  = true;
    }
    
    /**
     *  获取属性值[备注]
     */
    public String getBZ(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().getBZ();
    	}
        return this.bz;
    }

    /**
     *  获取属性值[备注]是否修改
     */
    public boolean isBZDirty(){
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().isBZDirty();
    	}
        return this.bzDirtyFlag;
    }

    /**
     *  重置属性值[备注]
     */
    public void resetBZ(){
    	
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().resetBZ();
    		 return;
    	}
    	
        this.bzDirtyFlag = false;
        this.bz = null;
    }

	/* (non-Javadoc)
	 * @see net.ibizsys.paas.entity.EntityBase#onReset()
	 */
    @Override
    protected void onReset()
    {
       GG_ATTACH.resetAll(this);
       super.onReset();
    }
    
    /**
     * 重置当前数据对象属性值
     * @param entity
     */
    private static void resetAll(GG_ATTACH et){
        et.resetGG_ATTACHId();
        et.resetGG_ATTACHName();
        et.resetCreateDate();
        et.resetCreateMan();
        et.resetUpdateDate();
        et.resetUpdateMan();
        et.resetCARDID();
        et.resetFJLX();
        et.resetLJ();
        et.resetFJ();
        et.resetBZ();
    }

     /* (non-Javadoc)
      * @see net.ibizsys.paas.entity.EntityBase#onFillMap(java.util.HashMap, boolean)
      */
    @Override
    protected void onFillMap(HashMap<String, Object> params, boolean bDirtyOnly)
    {
        if(!bDirtyOnly || isGG_ATTACHIdDirty()){
             params.put(FIELD_GG_ATTACHID,getGG_ATTACHId());
        } 
        if(!bDirtyOnly || isGG_ATTACHNameDirty()){
             params.put(FIELD_GG_ATTACHNAME,getGG_ATTACHName());
        } 
        if(!bDirtyOnly || isCreateDateDirty()){
             params.put(FIELD_CREATEDATE,getCreateDate());
        } 
        if(!bDirtyOnly || isCreateManDirty()){
             params.put(FIELD_CREATEMAN,getCreateMan());
        } 
        if(!bDirtyOnly || isUpdateDateDirty()){
             params.put(FIELD_UPDATEDATE,getUpdateDate());
        } 
        if(!bDirtyOnly || isUpdateManDirty()){
             params.put(FIELD_UPDATEMAN,getUpdateMan());
        } 
        if(!bDirtyOnly || isCARDIDDirty()){
             params.put(FIELD_CARDID,getCARDID());
        } 
        if(!bDirtyOnly || isFJLXDirty()){
             params.put(FIELD_FJLX,getFJLX());
        } 
        if(!bDirtyOnly || isLJDirty()){
             params.put(FIELD_LJ,getLJ());
        } 
        if(!bDirtyOnly || isFJDirty()){
             params.put(FIELD_FJ,getFJ());
        } 
        if(!bDirtyOnly || isBZDirty()){
             params.put(FIELD_BZ,getBZ());
        } 
    	super.onFillMap(params, bDirtyOnly);
    }
   
    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#get(java.lang.String)
     */
    @Override
	public Object get(String strParamName) throws Exception
	{
    	if(this.getProxyEntity()!=null){
    		return this.getProxyEntity().get(strParamName);
    	}
    	
            if(StringHelper.isNullOrEmpty(strParamName))
                 throw new Exception("没有指定属性");
            Integer index=fieldIndexMap.get(strParamName.toUpperCase());
            if(index==null)
                 return super.get(strParamName);

                return  GG_ATTACH.get(this, index);
	}
    
    /**
     * 通过属性标识获取属性值
     * @param et 数据对象
     * @param index 属性标识
     * @return
     * @throws Exception
     */
    private static Object get(GG_ATTACH et,int index) throws Exception{
             
            switch(index)
    	    {
               case INDEX_GG_ATTACHID:return et.getGG_ATTACHId();
               case INDEX_GG_ATTACHNAME:return et.getGG_ATTACHName();
               case INDEX_CREATEDATE:return et.getCreateDate();
               case INDEX_CREATEMAN:return et.getCreateMan();
               case INDEX_UPDATEDATE:return et.getUpdateDate();
               case INDEX_UPDATEMAN:return et.getUpdateMan();
               case INDEX_CARDID:return et.getCARDID();
               case INDEX_FJLX:return et.getFJLX();
               case INDEX_LJ:return et.getLJ();
               case INDEX_FJ:return et.getFJ();
               case INDEX_BZ:return et.getBZ();
    	       default:
    		     throw new Exception("不明属性标识");
    	    }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#set(java.lang.String, java.lang.Object)
     */
    @Override
	public void set(String strParamName,Object objValue) throws Exception
	{
    	if(this.getProxyEntity()!=null){
    		 this.getProxyEntity().set(strParamName,objValue);
    		 return;
    	}
            if(StringHelper.isNullOrEmpty(strParamName))
                 throw new Exception("没有指定属性");

            Integer index=fieldIndexMap.get(strParamName.toUpperCase());
            if(index==null)
            {
                super.set(strParamName,objValue);
                return;
            }
            
            GG_ATTACH.set(this,index,objValue);
 	}

    /**
     * 通过属性标识设定属性值
     * @param et 数据对象
     * @param index 属性标识
     * @param obj 值
     * @throws Exception
     */
            private static void set(GG_ATTACH et,int index,Object obj) throws Exception
         {    
            switch(index)
    	    {
               case INDEX_GG_ATTACHID:et.setGG_ATTACHId(DataObject.getStringValue(obj));return ;
               case INDEX_GG_ATTACHNAME:et.setGG_ATTACHName(DataObject.getStringValue(obj));return ;
               case INDEX_CREATEDATE:et.setCreateDate(DataObject.getTimestampValue(obj));return ;
               case INDEX_CREATEMAN:et.setCreateMan(DataObject.getStringValue(obj));return ;
               case INDEX_UPDATEDATE:et.setUpdateDate(DataObject.getTimestampValue(obj));return ;
               case INDEX_UPDATEMAN:et.setUpdateMan(DataObject.getStringValue(obj));return ;
               case INDEX_CARDID:et.setCARDID(DataObject.getStringValue(obj));return ;
               case INDEX_FJLX:et.setFJLX(DataObject.getStringValue(obj));return ;
               case INDEX_LJ:et.setLJ(DataObject.getStringValue(obj));return ;
               case INDEX_FJ:et.setFJ(DataObject.getStringValue(obj));return ;
               case INDEX_BZ:et.setBZ(DataObject.getStringValue(obj));return ;
    	       default:
    		     throw new Exception("不明属性标识");
    	    }
        }

            /* (non-Javadoc)
             * @see net.ibizsys.paas.data.DataObject#isNull(java.lang.String)
             */
            @Override
    	public boolean isNull(String strParamName) throws Exception
    	{
			 if(this.getProxyEntity()!=null){
		 		return this.getProxyEntity().isNull(strParamName);
		 	}
            if(StringHelper.isNullOrEmpty(strParamName))
                 throw new Exception("没有指定属性");

    	    Integer index=fieldIndexMap.get(strParamName.toUpperCase());
            if(index==null)
                 return super.isNull(strParamName);

    	     return  GG_ATTACH.isNull(this, index);
    	}

            /**
             * 判断指定属性值是否为空值
             * @param et
             * @param index
             * @return
             * @throws Exception
             */
         private static boolean isNull(GG_ATTACH et,int index) throws Exception{
             
            switch(index)
    	    {
               case INDEX_GG_ATTACHID:return et.getGG_ATTACHId()==null;
               case INDEX_GG_ATTACHNAME:return et.getGG_ATTACHName()==null;
               case INDEX_CREATEDATE:return et.getCreateDate()==null;
               case INDEX_CREATEMAN:return et.getCreateMan()==null;
               case INDEX_UPDATEDATE:return et.getUpdateDate()==null;
               case INDEX_UPDATEMAN:return et.getUpdateMan()==null;
               case INDEX_CARDID:return et.getCARDID()==null;
               case INDEX_FJLX:return et.getFJLX()==null;
               case INDEX_LJ:return et.getLJ()==null;
               case INDEX_FJ:return et.getFJ()==null;
               case INDEX_BZ:return et.getBZ()==null;
    	       default:
    		     throw new Exception("不明属性标识");
    	    }
    }

    
         /* (non-Javadoc)
          * @see net.ibizsys.paas.data.DataObject#contains(java.lang.String)
          */
         @Override
    	public boolean contains(String strParamName) throws Exception
    	{
    	 	if(this.getProxyEntity()!=null){
		 		return this.getProxyEntity().contains(strParamName);
		 	}
    	 
            if(StringHelper.isNullOrEmpty(strParamName))
                 throw new Exception("没有指定属性");
    	    Integer index=fieldIndexMap.get(strParamName.toUpperCase());
            if(index==null)
                 return super.contains(strParamName);

    	    return  GG_ATTACH.contains(this, index);
    	}

    /**
     * 获取判断对象是否存在指定属性值
     * @param et
     * @param index
     * @return
     * @throws Exception
     */
         private static boolean contains(GG_ATTACH et,int index) throws Exception{
             
            switch(index)
    	    {
               case INDEX_GG_ATTACHID:return et.isGG_ATTACHIdDirty();
               case INDEX_GG_ATTACHNAME:return et.isGG_ATTACHNameDirty();
               case INDEX_CREATEDATE:return et.isCreateDateDirty();
               case INDEX_CREATEMAN:return et.isCreateManDirty();
               case INDEX_UPDATEDATE:return et.isUpdateDateDirty();
               case INDEX_UPDATEMAN:return et.isUpdateManDirty();
               case INDEX_CARDID:return et.isCARDIDDirty();
               case INDEX_FJLX:return et.isFJLXDirty();
               case INDEX_LJ:return et.isLJDirty();
               case INDEX_FJ:return et.isFJDirty();
               case INDEX_BZ:return et.isBZDirty();
    	       default:
    		     throw new Exception("不明属性标识");
    	    }
    }

         /* (non-Javadoc)
          * @see net.ibizsys.paas.data.DataObject#onFillJSONObject(net.sf.json.JSONObject, boolean)
          */
    @Override
      protected void onFillJSONObject(JSONObject objJSON, boolean bIncludeEmpty) throws Exception
      {
          fillJSONObject(this,objJSON,bIncludeEmpty);
          super.onFillJSONObject(objJSON, bIncludeEmpty);
       }
        
    /**
     * 填充当前对象到JSON
     * @param et 当前数据对象
     * @param json JSON对象
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
        private static  void fillJSONObject(GG_ATTACH et,JSONObject json, boolean bIncEmpty) throws Exception
        {
                if(bIncEmpty||et.getGG_ATTACHId()!=null)
        	{
                	JSONObjectHelper.put(json,"gg_attachid",getJSONValue(et.getGG_ATTACHId()),false);
        	}
                if(bIncEmpty||et.getGG_ATTACHName()!=null)
        	{
                	JSONObjectHelper.put(json,"gg_attachname",getJSONValue(et.getGG_ATTACHName()),false);
        	}
                if(bIncEmpty||et.getCreateDate()!=null)
        	{
                	JSONObjectHelper.put(json,"createdate",getJSONValue(et.getCreateDate()),false);
        	}
                if(bIncEmpty||et.getCreateMan()!=null)
        	{
                	JSONObjectHelper.put(json,"createman",getJSONValue(et.getCreateMan()),false);
        	}
                if(bIncEmpty||et.getUpdateDate()!=null)
        	{
                	JSONObjectHelper.put(json,"updatedate",getJSONValue(et.getUpdateDate()),false);
        	}
                if(bIncEmpty||et.getUpdateMan()!=null)
        	{
                	JSONObjectHelper.put(json,"updateman",getJSONValue(et.getUpdateMan()),false);
        	}
                if(bIncEmpty||et.getCARDID()!=null)
        	{
                	JSONObjectHelper.put(json,"cardid",getJSONValue(et.getCARDID()),false);
        	}
                if(bIncEmpty||et.getFJLX()!=null)
        	{
                	JSONObjectHelper.put(json,"fjlx",getJSONValue(et.getFJLX()),false);
        	}
                if(bIncEmpty||et.getLJ()!=null)
        	{
                	JSONObjectHelper.put(json,"lj",getJSONValue(et.getLJ()),false);
        	}
                if(bIncEmpty||et.getFJ()!=null)
        	{
                	JSONObjectHelper.put(json,"fj",getJSONValue(et.getFJ()),false);
        	}
                if(bIncEmpty||et.getBZ()!=null)
        	{
                	JSONObjectHelper.put(json,"bz",getJSONValue(et.getBZ()),false);
        	}
        }

        /* (non-Javadoc)
         * @see net.ibizsys.paas.data.DataObject#onFillXmlNode(net.ibizsys.paas.xml.XmlNode, boolean)
         */
     @Override
      protected void onFillXmlNode(XmlNode xmlNode,boolean bIncludeEmpty) throws Exception
      {
           fillXmlNode(this,xmlNode,bIncludeEmpty);
           super.onFillXmlNode(xmlNode, bIncludeEmpty);
       }
        
     /**
      * 填充当前对象到Xml节点中
      * @param et 当前数据对象
      * @param node Xml节点
      * @param bIncEmpty 是否包括空值
      * @throws Exception
      */
        private static void fillXmlNode(GG_ATTACH et,XmlNode node,boolean bIncEmpty) throws Exception
        {
                if(bIncEmpty||et.getGG_ATTACHId()!=null)
        	{
                    Object obj = et.getGG_ATTACHId();
                    node.setAttribute("GG_ATTACHID",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getGG_ATTACHName()!=null)
        	{
                    Object obj = et.getGG_ATTACHName();
                    node.setAttribute("GG_ATTACHNAME",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getCreateDate()!=null)
        	{
                    Object obj = et.getCreateDate();
                    node.setAttribute("CREATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
         	}
                if(bIncEmpty||et.getCreateMan()!=null)
        	{
                    Object obj = et.getCreateMan();
                    node.setAttribute("CREATEMAN",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getUpdateDate()!=null)
        	{
                    Object obj = et.getUpdateDate();
                    node.setAttribute("UPDATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
         	}
                if(bIncEmpty||et.getUpdateMan()!=null)
        	{
                    Object obj = et.getUpdateMan();
                    node.setAttribute("UPDATEMAN",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getCARDID()!=null)
        	{
                    Object obj = et.getCARDID();
                    node.setAttribute("CARDID",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getFJLX()!=null)
        	{
                    Object obj = et.getFJLX();
                    node.setAttribute("FJLX",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getLJ()!=null)
        	{
                    Object obj = et.getLJ();
                    node.setAttribute("LJ",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getFJ()!=null)
        	{
                    Object obj = et.getFJ();
                    node.setAttribute("FJ",(obj==null)?"":(String)obj);
         	}
                if(bIncEmpty||et.getBZ()!=null)
        	{
                    Object obj = et.getBZ();
                    node.setAttribute("BZ",(obj==null)?"":(String)obj);
         	}


        }

        /* (non-Javadoc)
         * @see net.ibizsys.paas.entity.EntityBase#onCopyTo(net.ibizsys.paas.data.IDataObject, boolean)
         */
	    @Override
	   	protected void onCopyTo(IDataObject dataEntity, boolean bIncludeEmtpy) throws Exception
	  	{
	          GG_ATTACH.copyTo(this,dataEntity,bIncludeEmtpy);
	          super.onCopyTo(dataEntity,bIncludeEmtpy);
	  	}
        
	    /**
         * 复制当前对象数据到目标对象
         * @param et 当前数据对象
         * @param dst 目标数据对象
         * @param bIncEmpty 是否包括空值
         * @throws Exception
         */
        private static void copyTo(GG_ATTACH et,IDataObject dst,boolean bIncEmpty) throws Exception
        {
            if(et.isGG_ATTACHIdDirty() && (bIncEmpty||et.getGG_ATTACHId()!=null))
        	{
        		dst.set(FIELD_GG_ATTACHID,et.getGG_ATTACHId());
         	}
            if(et.isGG_ATTACHNameDirty() && (bIncEmpty||et.getGG_ATTACHName()!=null))
        	{
        		dst.set(FIELD_GG_ATTACHNAME,et.getGG_ATTACHName());
         	}
            if(et.isCreateDateDirty() && (bIncEmpty||et.getCreateDate()!=null))
        	{
        		dst.set(FIELD_CREATEDATE,et.getCreateDate());
         	}
            if(et.isCreateManDirty() && (bIncEmpty||et.getCreateMan()!=null))
        	{
        		dst.set(FIELD_CREATEMAN,et.getCreateMan());
         	}
            if(et.isUpdateDateDirty() && (bIncEmpty||et.getUpdateDate()!=null))
        	{
        		dst.set(FIELD_UPDATEDATE,et.getUpdateDate());
         	}
            if(et.isUpdateManDirty() && (bIncEmpty||et.getUpdateMan()!=null))
        	{
        		dst.set(FIELD_UPDATEMAN,et.getUpdateMan());
         	}
            if(et.isCARDIDDirty() && (bIncEmpty||et.getCARDID()!=null))
        	{
        		dst.set(FIELD_CARDID,et.getCARDID());
         	}
            if(et.isFJLXDirty() && (bIncEmpty||et.getFJLX()!=null))
        	{
        		dst.set(FIELD_FJLX,et.getFJLX());
         	}
            if(et.isLJDirty() && (bIncEmpty||et.getLJ()!=null))
        	{
        		dst.set(FIELD_LJ,et.getLJ());
         	}
            if(et.isFJDirty() && (bIncEmpty||et.getFJ()!=null))
        	{
        		dst.set(FIELD_FJ,et.getFJ());
         	}
            if(et.isBZDirty() && (bIncEmpty||et.getBZ()!=null))
        	{
        		dst.set(FIELD_BZ,et.getBZ());
         	}
        }
        
        /* (non-Javadoc)
         * @see net.ibizsys.paas.data.DataObject#remove(java.lang.String)
         */
        @Override
    	public boolean remove(String strParamName) throws Exception
    	{
        	if(this.getProxyEntity()!=null){
		 		return this.getProxyEntity().remove(strParamName);
		 	}
        	
            if(StringHelper.isNullOrEmpty(strParamName))
                 throw new Exception("没有指定属性");
            Integer index=fieldIndexMap.get(strParamName.toUpperCase());
            if(index==null)
                 return super.remove(strParamName);
            return  GG_ATTACH.remove(this, index);
    	}
        
        /**
         * 通过属性标识删除属性值
         * @param entity
         * @param index
         * @return
         * @throws Exception
         */
        private static boolean remove(GG_ATTACH et,int index) throws Exception
        {
        	switch(index)
        	{
				case INDEX_GG_ATTACHID: et.resetGG_ATTACHId();return true;
				case INDEX_GG_ATTACHNAME: et.resetGG_ATTACHName();return true;
				case INDEX_CREATEDATE: et.resetCreateDate();return true;
				case INDEX_CREATEMAN: et.resetCreateMan();return true;
				case INDEX_UPDATEDATE: et.resetUpdateDate();return true;
				case INDEX_UPDATEMAN: et.resetUpdateMan();return true;
				case INDEX_CARDID: et.resetCARDID();return true;
				case INDEX_FJLX: et.resetFJLX();return true;
				case INDEX_LJ: et.resetLJ();return true;
				case INDEX_FJ: et.resetFJ();return true;
				case INDEX_BZ: et.resetBZ();return true;
				default: throw new Exception("不明属性标识");
			}
        }


     private Object objCARDLock = new Object();
     private com.sa.litetwo.srv.card.entity.GG_CARD card = null;
     /**
     * 获取父数据 简历信息卡
      * @throws Exception
     */
    public com.sa.litetwo.srv.card.entity.GG_CARD getCARD() throws Exception
    {
    	if(this.getProxyEntity()!=null){
	 		return this.getProxyEntity().getCARD();
	 	}
    	
        if(this.getCARDID()==null)
             return null;
        synchronized(objCARDLock)
        {
        	if(card==null)
        	{
        		card = new com.sa.litetwo.srv.card.entity.GG_CARD();
        		card.setGG_CARDId(this.getCARDID());
     	        com.sa.litetwo.srv.card.service.GG_CARDService service = (com.sa.litetwo.srv.card.service.GG_CARDService)ServiceGlobal.getService(com.sa.litetwo.srv.card.service.GG_CARDService.class,this.getSessionFactory()); 
     	          if(this.getCARDID().indexOf(net.ibizsys.paas.service.ServiceBase.TEMPKEY) == 0)
     	             service.getTemp(card);
     	        else
     	            service.get(card);
        	}
	        return card;
        }
    }





	/**
	 *  获取代理的数据对象
	 */
	private GG_ATTACH getProxyEntity(){return this.proxyGG_ATTACH;}

	/* (non-Javadoc)
	 * @see net.ibizsys.paas.data.DataObject#onProxy(net.ibizsys.paas.data.IDataObject)
	 */
	@Override
	protected void onProxy(IDataObject proxyDataObject)
	{
		this.proxyGG_ATTACH = null;
		if(proxyDataObject!=null && proxyDataObject instanceof GG_ATTACH){
			this.proxyGG_ATTACH = (GG_ATTACH)proxyDataObject;
		}
			
	}

}